//
// Created by Castle-Moriarty on 2025/11/8.
//

#include <cstring>
#include <iostream>
#include <cstring>
using namespace std;

// decltype as a return type
template<typename T, typename P>
auto maximum(T a, P b) -> decltype((a > b) ? a : b) {
    return a > b ? a : b;
}

int main() {
    // Decltype:type of an expression
    int a{9};
    double b{5.5};

    cout << "size: " << sizeof(decltype((a > b) ? a : b)) << endl;
    decltype((a > b) ? a : b) c{67};
    cout << "c: " << c << endl;
    auto max1 = maximun(a, b);
    cout << "max1: " << max1 << endl;

    return 0;
}
